{include 'admin/layout/header'}
<!--性能优化-->
<link rel="stylesheet" href="__ADMIN_STATIC__/css/addContent.css?random={extendSetting('random')}">
<div class="addcontent">
    <table class="table2">
        <input type="hidden" name="pid" value="{$pid}" />
        <tr>
            <td class="tl">
                <span>缓存更新</span>
            </td>
            <td>
                <div>
                    <table class="table3">
                        <tr>
                            <td colspan="5">
                                <span onclick="runApi(this)" title="一键更新"  data-close="6" data-submit-url="/api/cache/op?op=up_cache" data-method="post" style="color: #007AFF;cursor: pointer;">一键更新</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span onclick="runApi(this)" title="分类更新"  data-close="6" data-submit-url="/api/cache/op?op=up_cache&type=category" data-method="post" style="color: #007AFF;cursor: pointer;">分类更新</span>
                            </td>
                            <td>
                                <span onclick="runApi(this)" title="模块更新"  data-close="6" data-submit-url="/api/cache/op?op=up_cache&type=module" data-method="post" style="color: #007AFF;cursor: pointer;">模块更新</span>
                            </td>
                            <td>
                                <span onclick="runApi(this)" title="设置更新"  data-close="6" data-submit-url="/api/cache/op?op=up_cache&type=setting" data-method="post" style="color: #007AFF;cursor: pointer;">设置更新</span>
                            </td>
                            <td>
                                <span onclick="runApi(this)" title="字段更新"  data-close="6" data-submit-url="/api/cache/op?op=up_cache&type=field" data-method="post" style="color: #007AFF;cursor: pointer;">字段更新</span>
                            </td>
                            <td style="border-top: 1px solid #ddd;">
                                <span onclick="runApi(this)" title="插件更新"  data-close="6" data-submit-url="/api/cache/op?op=up_cache&type=plugin" data-method="post" style="color: #007AFF;cursor: pointer;">插件更新</span>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr>
            <td class="tl">
                <span>安装脚本</span>
            </td>
            <td>
                <div>
                    {php $methods=install_script_methods();$methods_count=count($methods);}
                    <table class="table3">
                        <tr>
                            <td colspan="6">
                                <span style="color:red;margin-left:20px;">如果不清楚如何使用，请不要随意点击。</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="6">
                                <span onclick="runApi(this)" title="执行安装脚本"  data-close="6" data-submit-url="{LTCMS_ROUTE_PREFIX}/script_install/install" style="color: #007AFF;cursor: pointer;">执行安装脚本</span>
                            </td>
                        </tr>
                        {if $methods}
                        {foreach $methods $key $val}
                        {if $key % 6==0}
                        <tr>
                        {/if}
                            <td>
                                <span onclick="runApi(this)" title="{$val}"  data-close="6" data-submit-url="{LTCMS_ROUTE_PREFIX}/script_install/exec?method={$val}" style="color: #007AFF;cursor: pointer;">{$val}</span>
                            </td>
                        {if $key % 6==5 || $key==($methods_count -1)}
                        </tr>
                        {/if}
                        {/foreach}
                        {/if}
                    </table>
                </div>
            </td>
        </tr>
        <tr>
            <td class="tl">
                <span>内容：去除反斜线</span>
            </td>
            <td>
                <div>
                    <form class="removeBackslashesForm" method="post" >
                        <input type="hidden" name="_method" value="put" >
                        <table class="table3">
                            <tr>
                                <td class="tl">
                                    <span><strong></strong>类型</span>
                                </td>
                                <td>
                                    <input name="type" value="all_article" type="radio">所有文章表
                                    <input name="type" value="all_article_data" type="radio" checked>所有文章内容表
                                    <input name="type" value="other" type="radio"  >自定义
                                </td>
                            </tr>
                            <tr>
                                <td class="tl">
                                    <span><strong></strong>表名</span>
                                </td>
                                <td>
                                    <input class="introduce" name="table" type="text" value="article_data_" >
                                </td>
                            </tr>
                            <tr>
                                <td class="tl">
                                    <span><strong></strong>字段</span>
                                </td>
                                <td>
                                    <input class="introduce" name="column" type="text" value="articleContent" >
                                </td>
                            </tr>
                        </table>
                        <div class="ltcms-button">
                            <button class="btns submit ajaxBtn" type="button" data-submit-url="{LTCMS_ROUTE_PREFIX}/article/removeBackslashes" data-method="post"  data-form=".removeBackslashesForm" data-close="6" >执行</button>
                        </div>
                    </form>
                </div>
            </td>
        </tr>
        <tr>
            <td class="tl">
                <span>网站更换地址：</span>
            </td>
            <td>
                <div>
                    <form class="replaceSiteUrlForm" method="post" >
                        <input type="hidden" name="_method" value="put" >
                        <table class="table3">
                            <tr>
                                <td class="tl">
                                    <span><strong></strong>旧网址</span>
                                </td>
                                <td>
                                    <input class="introduce" name="old_url" type="text" value="{config('app.url','')}" >
                                </td>
                            </tr>
                            <tr>
                                <td class="tl">
                                    <span><strong></strong>新网址</span>
                                </td>
                                <td>
                                    <input class="introduce" name="new_url" type="text" value="" >
                                </td>
                            </tr>
                        </table>
                        <div class="ltcms-button">
                            <button class="btns submit ajaxBtn" type="button" data-submit-url="{LTCMS_ROUTE_PREFIX}/tool/replaceSiteUrl" data-method="post"  data-form=".replaceSiteUrlForm" data-close="6" >替换</button>
                        </div>
                    </form>
                </div>
            </td>
        </tr>
    </table>
</div>
{include 'admin/layout/file_upload_script_slice'}
{include 'admin/layout/footer'}